/**
 * @projectName: api-client-sdk
 * @package: com.wangzz.apiclientsdk
 * @className: ApiClientConfig
 * @author: wangzz
 * @description: TODO
 * @date: 2024/3/11 15:16
 * @version: 1.0
 */

package com.wangzz.apiclientsdk;

import com.wangzz.apiclientsdk.client.ApiClient;
import com.wangzz.apiclientsdk.client.NameClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: wangzz
 * @Description: api配置文件
 * @DateTime: 2024/3/11 15:16
 **/
@ComponentScan
@Configuration
@Data
@ConfigurationProperties(prefix = "api.client")
public class ApiClientConfig {

    private String accessKey;
    private String secretKey;

    @Bean
    public ApiClient apiClient() {
        return new ApiClient(accessKey, secretKey);
    }

    @Bean
    public NameClient nameClient() {
        return new NameClient(accessKey, secretKey);
    }
}